package org.example.user.dto;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class LoginDTO {
    @NotEmpty(message = "用户名不能为空")
    private String username;

    /**
     * 密码必须包含数字和字母
     */
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z]).{8,}$", message = "密码必须包含数字和字母")
    private String password;
}
